import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/home", // 新增重定向规则
  },
  {
    path: "/home",
    name: "home",
    component: () => import("../views/home/index.vue"),
  },
  // {
  //   path: "/test",
  //   name: "test",
  //   component: () => import("./../test.vue"),
  // },
];

const router = createRouter({
  history: createWebHashHistory("./"), // 修改为 createWebHashHistory
  routes,
});

export default router;